//
//  blockButtonView.m
//  HappyBug
//
//  Created by liulei on 2018/11/9.
//  Copyright © 2018年 www.hc.com.cn. All rights reserved.
//

#import "blockButtonView.h"

@implementation blockButtonView


-(instancetype)initWithFrame:(CGRect)frame{
    self=[super initWithFrame: frame];
    if(self){
        
       [self initView];
    }
    
    return  self;
}
-(void)initView{
   UIButton *button  =[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 20, 30)];
    [button setBackgroundColor:[UIColor redColor]];
    [button addTarget:self action:@selector(buttoncliock) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:button ];
}
-(void)buttoncliock{
    if(self.clickbuttonblock){
        self.clickbuttonblock();
    }
}


@end
